from django.core.mail import EmailMessage, EmailMultiAlternatives
from django.template.loader import get_template, render_to_string

def send_email(to_addresses, from_address, subject, content):
	# render the content dictionary to both plain text and html
	html_content = render_to_string('email_notification.html', content)
	text_content = render_to_string('email_notification.txt', content)

	email = EmailMultiAlternatives(subject, text_content, from_email=from_address, to=to_addresses)
	email.attach_alternative(html_content, "text/html")
	#email = EmailMessage(subject='New Note', body=body_text, from_email='it-helpdesk@missoulaboneandjoint.com', to=to_addresses)
	email.send()
